package com.jrx.anytxn.feign.investor.service;

import com.jrx.anytxn.feign.investor.request.InvestorCancelLoanReq;
import com.jrx.anytxn.feign.investor.request.LoanReq;
import com.jrx.anytxn.feign.investor.response.LoanRes;
import com.jrx.anytxn.i18n.response.TxnRespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * AnyTxn联合贷模块feign
 *
 * @author liuyang
 * @date 2020-06-15
 */
@FeignClient(name ="anytxn-cf-investor-api")
public interface IAnyTxnInvestorService {

    /**
     * 联合贷放款失败取消订单
     *
     * @param req 联合贷放款失败取消订单请求实体
     * @return TxnRespResult<InvestorCancelLoanRes> 联合贷放款失败取消订单响应实体
     * @author liuyang
     * @date 2020-06-15
     */
    @PostMapping(value = "/api/investor/loan/cancelLoan",consumes = "application/json;charset=UTF-8")
    TxnRespResult cancelLoan(InvestorCancelLoanReq req);

    /**
     * 联合贷放款
     *
     * @param req 联合贷放款请求实体类
     * @return TxnRespResult<LoanRes> 联合贷放款返回实体类
     * @author liuyang
     * @date 2020-06-15
     */
    @PostMapping(value = "/api/investor/loan/loan",consumes = "application/json;charset=UTF-8")
    TxnRespResult<LoanRes> loan(LoanReq req);
}
